<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
		var num = 0;
		var res = String(num);
		'0' == ''
		console.log(res);
		console.log(typeof res);
		console.log('--------------------------');

		var str = '';
		alert(res == str);//Number(0) 转 String 为 '0'.   结果为false
		var res = Number(str);
		alert(res == num);//String('') 转 Number 为 0 .   结果为true
		console.log(res);
		console.log(typeof res);

		var res = '0' == 0;   '0'=='';
		alert(res);//结果为true
		var res = '' == 0;
		alert(res);//结果为true
	</script>
</body>
</html>